﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Entities.IRepository;
using DAL.Admin;
using DAL.ThuQuy;
using Entities;
using BLL.BLL;
using WindowsForms.Admin;

namespace WindowsForms.ThuQuy
{
    public partial class FormHoaDon : Form
    {
        public INhanVienRepository nv = new BLTNhanVienRepository();
        public IHoaDonRepository hd = new BLTHoaDonRepository();
        public IChiTietHoaDonRepository cthd = new BLTChiTietHoaDonReponsitory();
        public FormHoaDon()
        {
            InitializeComponent();
        }

        private void XemChiTietToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormChiTietHoaDon frm = new FormChiTietHoaDon();
            frm.ShowDialog();
        }

        private void btnThoat_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void FormHoaDon_Load(object sender, EventArgs e)
        {
            //NhanVien nhanvien = new NhanVien();
            QuanLyHoaDon.LoadNhanVien(cbbNguoiLap, nv.LayTatCa());
            QuanLyHoaDon.LoadListView(lvHoaDon, hd.LayTatCa());
            QuanLyHoaDon.LoadVatPham(cbbVatPham, cthd.XemTatCa());
        }
    }
}
